/*
 * <p>Copyright® 2009-2022 东软 IT 实训中心版权所有。</p>
 */

package com.max.back.doctor.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.max.back.entity.Drug;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Map;
import java.util.List;

/**
 * @author 辛凤文 forward.seen@foxmail.com
 * @version 1.0
 * @description <p>
 * <code>DrugDao</code>
 *
 * </p>
 * @time 2022/7/26 21:55
 * @see
 */
@Repository("/doctorDrugDao")
public interface DrugDao extends BaseMapper<Drug> {

    @Select({
            "select id,name,specification,manufacturer,usage_Dosage," +
                    "drug_Type,inventory from drug where description like " +
                    "'%'||#{keyword}||'%'"
    })
    List<Map<String,Object>> selectDrugMaps(@Param("keyword") String keyword);
}